Merge branch 'display-capplet-ui-cleanup'
This makes the following changes in the display capplet: - Now fits in 640x480 and has a better layout overall. - We just use "monitors" for wording, not a mixture of "monitor", "display", "screen". - Make the mouse cursor indicate when you can drag a monitor.
This commit is contained in:
commit
b03eba7c2f
2 changed files with 299 additions and 267 deletions
|
@ -4,32 +4,26 @@
|
||||||
<!-- interface-naming-policy toplevel-contextual -->
|
<!-- interface-naming-policy toplevel-contextual -->
|
||||||
<object class="GtkDialog" id="dialog">
|
<object class="GtkDialog" id="dialog">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="title" translatable="yes">Display Preferences</property>
|
<property name="title" translatable="yes">Monitor Preferences</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
<object class="GtkVBox" id="dialog-vbox1">
|
<object class="GtkVBox" id="dialog-vbox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkVBox" id="vbox1">
|
<object class="GtkTable" id="table2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="border_width">5</property>
|
<property name="n_rows">2</property>
|
||||||
<property name="spacing">12</property>
|
<property name="n_columns">2</property>
|
||||||
|
<property name="column_spacing">12</property>
|
||||||
|
<property name="row_spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label6">
|
<object class="GtkVBox" id="vbox3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Drag the monitors to set their place</property>
|
<property name="orientation">vertical</property>
|
||||||
<attributes>
|
<property name="spacing">12</property>
|
||||||
<attribute name="style" value="italic"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkAlignment" id="align">
|
<object class="GtkAlignment" id="align">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -38,15 +32,16 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">1</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkHBox" id="hbox1">
|
<object class="GtkHBox" id="hbox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="clone_checkbox">
|
<object class="GtkCheckButton" id="clone_checkbox">
|
||||||
<property name="label" translatable="yes">_Mirror screens</property>
|
<property name="label" translatable="yes">Sa_me image in all monitors</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
|
@ -61,10 +56,10 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="detect_displays_button">
|
<object class="GtkButton" id="detect_displays_button">
|
||||||
<property name="label" translatable="yes">_Detect Monitors</property>
|
<property name="label" translatable="yes">_Detect monitors</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -78,53 +73,70 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">2</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEventBox" id="current_monitor_event_box">
|
<object class="GtkVBox" id="vbox4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="current_monitor_label">
|
<object class="GtkLabel" id="label8">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Monitor</property>
|
<property name="label" translatable="yes">Panel icon</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment" id="alignment2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="show_notification_icon">
|
||||||
|
<property name="label" translatable="yes">_Show monitors in panel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">3</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment" id="alignment1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTable" id="table1">
|
<object class="GtkTable" id="table1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">3</property>
|
<property name="n_rows">6</property>
|
||||||
<property name="n_columns">5</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="column_spacing">12</property>
|
<property name="column_spacing">12</property>
|
||||||
<property name="row_spacing">6</property>
|
<property name="row_spacing">6</property>
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="panel_checkbox">
|
|
||||||
<property name="label" translatable="yes">Include _panel</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">3</property>
|
|
||||||
<property name="right_attach">5</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label2">
|
<object class="GtkLabel" id="label2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -134,11 +146,9 @@
|
||||||
<property name="mnemonic_widget">resolution_combo</property>
|
<property name="mnemonic_widget">resolution_combo</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -151,28 +161,9 @@
|
||||||
<property name="mnemonic_widget">refresh_combo</property>
|
<property name="mnemonic_widget">refresh_combo</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="bottom_attach">4</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label5">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">R_otation:</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="mnemonic_widget">rotation_combo</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">3</property>
|
|
||||||
<property name="right_attach">4</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -181,11 +172,10 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">3</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">2</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -194,45 +184,13 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">3</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="bottom_attach">3</property>
|
<property name="bottom_attach">4</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkComboBox" id="rotation_combo">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="model">liststore1</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="text">0</attribute>
|
|
||||||
</attributes>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="right_attach">5</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkAlignment" id="alignment1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="left_padding">12</property>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="y_options">GTK_FILL</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkHBox" id="hbox2">
|
<object class="GtkHBox" id="hbox2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -244,6 +202,7 @@
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
<property name="active">True</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -270,52 +229,104 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="right_attach">5</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="bottom_attach">2</property>
|
||||||
<property name="y_options">GTK_FILL</property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="position">4</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label8">
|
<object class="GtkEventBox" id="current_monitor_event_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="current_monitor_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Panel icon</property>
|
<property name="label" translatable="yes">Monitor</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="fill">False</property>
|
<property name="y_options"></property>
|
||||||
<property name="position">5</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkAlignment" id="alignment2">
|
<object class="GtkLabel" id="label5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="left_padding">12</property>
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">R_otation:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">rotation_combo</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="show_notification_icon">
|
<object class="GtkComboBox" id="rotation_combo">
|
||||||
<property name="label" translatable="yes">_Show displays in panel</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="model">liststore1</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">0</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="panel_checkbox">
|
||||||
|
<property name="label" translatable="yes">Include _panel</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
<property name="bottom_attach">6</property>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment" id="alignment4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="fill">False</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="position">6</property>
|
<property name="top_attach">5</property>
|
||||||
|
<property name="bottom_attach">6</property>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
<property name="y_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -1464,6 +1464,30 @@ compare_snaps (gconstpointer v1, gconstpointer v2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sets a mouse cursor for a widget's window. As a hack, you can pass
|
||||||
|
* GDK_BLANK_CURSOR to mean "set the cursor to NULL" (i.e. reset the widget's
|
||||||
|
* window's cursor to its default).
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
set_cursor (GtkWidget *widget, GdkCursorType type)
|
||||||
|
{
|
||||||
|
GdkCursor *cursor;
|
||||||
|
GdkWindow *window;
|
||||||
|
|
||||||
|
if (type == GDK_BLANK_CURSOR)
|
||||||
|
cursor = NULL;
|
||||||
|
else
|
||||||
|
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), type);
|
||||||
|
|
||||||
|
window = gtk_widget_get_window (widget);
|
||||||
|
|
||||||
|
if (window)
|
||||||
|
gdk_window_set_cursor (window, cursor);
|
||||||
|
|
||||||
|
if (cursor)
|
||||||
|
gdk_cursor_unref (cursor);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_output_event (FooScrollArea *area,
|
on_output_event (FooScrollArea *area,
|
||||||
FooScrollAreaEvent *event,
|
FooScrollAreaEvent *event,
|
||||||
|
@ -1472,6 +1496,13 @@ on_output_event (FooScrollArea *area,
|
||||||
GnomeOutputInfo *output = data;
|
GnomeOutputInfo *output = data;
|
||||||
App *app = g_object_get_data (G_OBJECT (area), "app");
|
App *app = g_object_get_data (G_OBJECT (area), "app");
|
||||||
|
|
||||||
|
/* If the mouse is inside the outputs, set the cursor to "you can move me". See
|
||||||
|
* on_canvas_event() for where we reset the cursor to the default if it
|
||||||
|
* exits the outputs' area.
|
||||||
|
*/
|
||||||
|
if (!app->current_configuration->clone && get_n_connected (app) > 1)
|
||||||
|
set_cursor (GTK_WIDGET (area), GDK_FLEUR);
|
||||||
|
|
||||||
if (event->type == FOO_BUTTON_PRESS)
|
if (event->type == FOO_BUTTON_PRESS)
|
||||||
{
|
{
|
||||||
GrabInfo *info;
|
GrabInfo *info;
|
||||||
|
@ -1570,24 +1601,17 @@ on_output_event (FooScrollArea *area,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void
|
static void
|
||||||
on_canvas_event (FooScrollArea *area,
|
on_canvas_event (FooScrollArea *area,
|
||||||
FooScrollAreaEvent *event,
|
FooScrollAreaEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
App *app = g_object_get_data (G_OBJECT (area), "app");
|
/* If the mouse exits the outputs, reset the cursor to the default. See
|
||||||
|
* on_output_event() for where we set the cursor to the movement cursor if
|
||||||
if (event->type == FOO_BUTTON_PRESS)
|
* it is over one of the outputs.
|
||||||
{
|
*/
|
||||||
app->current_output = NULL;
|
set_cursor (GTK_WIDGET (area), GDK_BLANK_CURSOR);
|
||||||
|
|
||||||
rebuild_gui (app);
|
|
||||||
|
|
||||||
foo_scroll_area_invalidate (area);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static PangoLayout *
|
static PangoLayout *
|
||||||
get_display_name (App *app,
|
get_display_name (App *app,
|
||||||
|
@ -1631,9 +1655,7 @@ paint_background (FooScrollArea *area,
|
||||||
|
|
||||||
cairo_fill_preserve (cr);
|
cairo_fill_preserve (cr);
|
||||||
|
|
||||||
#if 0
|
|
||||||
foo_scroll_area_add_input_from_fill (area, cr, on_canvas_event, NULL);
|
foo_scroll_area_add_input_from_fill (area, cr, on_canvas_event, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
cairo_set_source_rgb (cr,
|
cairo_set_source_rgb (cr,
|
||||||
widget->style->dark[GTK_STATE_SELECTED].red / 65535.0,
|
widget->style->dark[GTK_STATE_SELECTED].red / 65535.0,
|
||||||
|
@ -2360,10 +2382,9 @@ run_application (App *app)
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (app->area), "app", app);
|
g_object_set_data (G_OBJECT (app->area), "app", app);
|
||||||
|
|
||||||
|
gtk_widget_set_tooltip_text (app->area, _("Select a monitor to change its properties; drag it to rearrange its placement."));
|
||||||
|
|
||||||
/* FIXME: this should be computed dynamically */
|
/* FIXME: this should be computed dynamically */
|
||||||
if (gdk_screen_get_height (gdk_screen_get_default ()) <= 600)
|
|
||||||
foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 150);
|
|
||||||
else
|
|
||||||
foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 200);
|
foo_scroll_area_set_min_size (FOO_SCROLL_AREA (app->area), -1, 200);
|
||||||
gtk_widget_show (app->area);
|
gtk_widget_show (app->area);
|
||||||
g_signal_connect (app->area, "paint",
|
g_signal_connect (app->area, "paint",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue